CC=g++
CLFAGS=-O3 -pedantic -Wall -Wextra
INCLUDE = -IModelo -IVista
INCLUDEGTKMM = -IVista-gtkmm
INCLUDEQT = -IVista-qt
INCLUDESTD = -IVista-std
LIB = Modelo/*.o Vista/*.o
LIBSTD = $(LIB) Vista-std/*.o
LIBGTKMM = $(LIB) Vista-gtkmm/*.o

GTKFLAGS = `pkg-config --cflags gtkmm-2.4 libglademm-2.4`
GTKLFLAGS =`pkg-config --libs gtkmm-2.4 libglademm-2.4`


all: Modelo Vista Vista-qt Vista-gtkmm Vista-std Doc

Vista-qt: Modelo Vista
	cd ./Vista-qt && qmake-qt4 && make
	mv ./Vista-qt/VistaQt ./

Vista-gtkmm: Modelo Vista gtkmm.cpp
	cd ./Vista-gtkmm && make all
	$(CC) $(CFLAGS) $(INCLUDE) $(INCLUDEGTKMM) -o gtkmm gtkmm.cpp $(LIBGTKMM) $(GTKFLAGS) $(GTKLFLAGS)

Vista-std: Modelo Vista std.cpp
	cd ./Vista-std && make all
	$(CC) $(CFLAGS) $(INCLUDE) $(INCLUDESTD) -o std std.cpp $(LIBSTD)

Modelo:
	cd ./Modelo && make all

Vista:
	cd ./Vista && make all

Doc:
	doxygen Doxyfile

clean:
	cd ./Modelo && make clean
	cd ./Vista-std && make clean
	cd ./Vista-gtkmm && make clean
	cd ./Vista && make clean
	cd ./Vista-qt && make clean
	rm -rf ../Doc/*
	rm -f gtkmm VistaQt std


.PHONY: Modelo Vista Vista-qt Vista-gtkmm Vista-std
